package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ArticleTagMapper;
import com.ruoyi.system.domain.ArticleTag;
import com.ruoyi.system.service.IArticleTagService;

/**
 * ArticleTagService业务层处理
 * 
 * @author star
 * @date 2024-09-05
 */
@Service
public class ArticleTagServiceImpl implements IArticleTagService 
{
    @Autowired
    private ArticleTagMapper articleTagMapper;

    /**
     * 查询ArticleTag
     * 
     * @param id ArticleTag主键
     * @return ArticleTag
     */
    @Override
    public ArticleTag selectArticleTagById(Integer id)
    {
        return articleTagMapper.selectArticleTagById(id);
    }

    /**
     * 查询ArticleTag列表
     * 
     * @param articleTag ArticleTag
     * @return ArticleTag
     */
    @Override
    public List<ArticleTag> selectArticleTagList(ArticleTag articleTag)
    {
        return articleTagMapper.selectArticleTagList(articleTag);
    }

    /**
     * 新增ArticleTag
     * 
     * @param articleTag ArticleTag
     * @return 结果
     */
    @Override
    public int insertArticleTag(ArticleTag articleTag)
    {
        articleTag.setCreateTime(DateUtils.getNowDate());
        return articleTagMapper.insertArticleTag(articleTag);
    }

    /**
     * 修改ArticleTag
     * 
     * @param articleTag ArticleTag
     * @return 结果
     */
    @Override
    public int updateArticleTag(ArticleTag articleTag)
    {
        articleTag.setUpdateTime(DateUtils.getNowDate());
        return articleTagMapper.updateArticleTag(articleTag);
    }

    /**
     * 批量删除ArticleTag
     * 
     * @param ids 需要删除的ArticleTag主键
     * @return 结果
     */
    @Override
    public int deleteArticleTagByIds(Integer[] ids)
    {
        return articleTagMapper.deleteArticleTagByIds(ids);
    }

    /**
     * 删除ArticleTag信息
     * 
     * @param id ArticleTag主键
     * @return 结果
     */
    @Override
    public int deleteArticleTagById(Integer id)
    {
        return articleTagMapper.deleteArticleTagById(id);
    }
}
